<?php
$this->breadcrumbs=array(
	'Benefactor Batches'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>'List Batch', 'url'=>array('index')),
	array('label'=>'Create Batch', 'url'=>array('create')),
	array('label'=>'Update Batch', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Batch', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Batch', 'url'=>array('admin')),
	array('label'=>'Add item', 'url'=>array('item/create','bid'=>$model->id)),	
);
?>

<h1>View Batch #<?php echo $model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'receipt_number',
		'received_date',
		'notes',
		'idLiaison.username:text:Liaison',
		'idBenefactor.name:text:Benefactor',
	),
)); ?>

<br>
<?php 
	echo CHtml::ajaxLink(Yii::t('item','[TODO] Add Item (Popup version)'),
		$this->createUrl('item/addnew'),
		array(
			'onclick'=>'$("#itemDialog").dialog("open"); return false;',
			'update'=>'#itemDialog'
		),
		array('id'=>'showItemDialog')
	);
?>
<div id="itemDialog"></div>

<?php
	$this->beginWidget('zii.widgets.CPortlet', array('title'=>'Batch Items',));
	$this->widget('zii.widgets.CListView', array('dataProvider'=>$itemDataProvider,
												'itemView'=>'/item/_view',));
	$this->endWidget();
?>

